import 'package:flutter/material.dart';
import 'package:search_people/page/dynamic/subs/dynamic_person/index.dart';
import 'package:search_people/utils/util.dart';
import 'package:search_people/value/topcolors.dart';

class PersonDynamicSectionWidget extends GetView<DynamicPersonController> {
  const PersonDynamicSectionWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 40.r,
      alignment: Alignment.center,
      decoration: BoxDecoration(
        color: Colors.white,
        border: Border(
          bottom: BorderSide(
            color: TopColors.bg,
          ),
        ),
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Row(
            children: [
              Container(
                margin: EdgeInsets.only(left: 12.r, right: 10.r),
                height: 20.r,
                width: 5.r,
                color: TopColors.main_color,
              ),
              Text(
                '工作动态',
                style: TextStyle(
                  color: TopColors.black_33,
                  fontSize: 14.sp,
                  fontWeight: FontWeight.bold,
                ),
              )
            ],
          ),
          InkWell(
            onTap: () {
              controller.actionFilterDate();
            },
            child: Row(
              children: [
                GetBuilder<DynamicPersonController>(
                  builder: (_) => Text(
                    '<${controller.state.date ?? '近期'}>',
                    style: TextStyle(
                      color: TopColors.black_66,
                      fontSize: 14.sp,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                ),
                Icon(
                  Icons.filter_alt_outlined,
                  color: TopColors.black_66,
                ),
              ],
            ),
          )
        ],
      ),
    );
  }
}
